package info.nixbear.tgcms.domain;

import java.util.List;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

import com.google.appengine.api.datastore.Text;

@PersistenceCapable(identityType=IdentityType.APPLICATION, detachable="true")
public class Website extends EntityBase {

	@Persistent
	private String name;

	@Persistent
	private List<String> urls;

	@Persistent
	private Text comment;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getUrls() {
		return urls;
	}

	public void setUrls(List<String> urls) {
		this.urls = urls;
	}

	public Text getComment() {
		return comment;
	}

	public void setComment(Text comment) {
		this.comment = comment;
	}

	public String getCommentAsString() {
		return (this.getComment() == null) ? null : this.getComment()
				.getValue();
	}

	public void setCommentAsString(String htmlString) {
		this.setComment(new Text(htmlString));
	}

}
